package com.xunlai.infra.permission.business.converter;

import com.xunlai.infra.permission.business.dao.entity.Poster;
import com.xunlai.infra.permission.business.dao.entity.PosterFavorite;
import com.xunlai.infra.permission.business.dao.entity.PosterTemplate;
import com.xunlai.infra.permission.business.dao.entity.PosterType;
import com.xunlai.infra.permission.business.vo.poster.*;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author liang
 * @date 8/7/23 9:59 PM
 */
@Mapper
public interface PosterConverter {
    PosterConverter INSTANCE = Mappers.getMapper(PosterConverter.class);

    PosterTemplate convertCreateVo2TemplateEntity(PosterTemplateCreateVo posterTemplateCreateVo);
    Poster convertCreateVo2PosterEntity(PosterCreateVo posterCreateVo);

    PosterFavorite convertCreateVo2FavoriteEntity(PosterFavoriteCreateVo posterFavoriteCreateVo);

    PosterType convertCreateVo2PosterTypeEntity(PosterTypeCreateVo routeTypeCreateVo);

    PosterTypeListVo convertPosterTypeEntity2ListVo(PosterType routeType);

    PosterType convertQueryVo2PosterTypeEntity(PosterTypeQueryVo routeTypeQueryVo);

    PosterTemplateListVo convertEntity2ListVo(PosterTemplate posterTemplate);
    PosterListVo convertPosterEntity2ListVo(Poster poster);

    PosterTemplateVo convertTemplateEntity2Vo(PosterTemplate posterTemplate);

    PosterDetailVo convertPosterEntity2DetailVo(Poster poster);
}
